  {extend name="Public:user_base" /}
  {block name="css"}
 <link rel="stylesheet" type="text/css" href="__PUBLIC__/js/webuploader/webuploader.css">
   <style>
.webuploader-pick {
    color: #fff;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
    background-color: #18ab7a;
    border-color: #18ab7a;
    padding:10px 30px;
}
.webuploader-pick-hover,.webuploader-pick:hover {
    color: #fff;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
    background-color: #6ebda3;
    border-color: #6ebda3;
}
  </style>
  {/block}
  {block name="body"}

<div class="ucenter-right">
<div class="myaccount-head es-tabli">
<ul>
<li class="current" data-id="myinfos">我的信息</li>
<li class=""  data-id="myavatar">设置头像</li>
<li class="" data-id="mypassword">密码安全</li>
<li class="hide" data-id="mybind">账号绑定</li>
</ul>
</div>
<div class="es-tabcontent">
<div id="myinfos" >

<div class="row topcontent" style="border:none;">


<div class="headtitle-normal" >
基本信息
</div>


<div class="clearfix row zichan" style="    position: relative;margin:0px 10px;"> 
<div class="myinfo es-mouseover" data-id="wendanginfo" style="border-right: 1px dotted #dbdcde;">
<div >
<p class="wealth-number"><a href="{:url('user/index')}">{$doccount}</a></p>
<p class="wealth-word">文档数 <i class="fa fa-angle-down"></i></p>
</div>
<table class="detail doc-num"  id="wendanginfo">
<tbody><tr>
<td class="first">文档数明细</td>
<td style="width: 160px;">
<div class="wrap">
<span class="unit">公开文档数</span>
<span class="num">{$gkdoccount}</span>
</div>
</td>
<td style="width: 160px;">
<div class="wrap">
<span class="unit">私有文档数</span>
<span class="num">{$sydoccount}</span>
</div>
</td>
<td style="width: 160px;">
<div class="wrap">
<span class="unit">付费文档数</span>
<span class="num">{$scoredoccount}</span>
</div>
</td>
<td style="width: 160px;">
<div class="wrap">
<span class="unit">审核通过率</span>
<span class="num">{$tgl}%</span>
</div>
</td>
</tr>
</tbody></table>
</div>
<div class="myinfo es-mouseover" data-id="caifuinfo"  style="border-right: 1px dotted #dbdcde;">
<div >
<p class="wealth-number"><a href="javascript:;">{$userinfo['point']}</a></p>
<p class="wealth-word">{$pointname} <i class="fa fa-angle-down"></i></p>


</div>
<table class="detail coin" id="caifuinfo">
<tbody><tr>
<td class="first">{$pointname}明细</td>
<td>
<div class="wrap">
<span class="unit">总{$pointname}</span>
<span class="num">{$userinfo['point']}</span>
</div>
</td>
<td>
<div class="wrap">
<span class="unit">上传文档</span>
<span class="num">+{$docuploadscoresum|default=0}</span>
</div>
</td>
<td>
<div class="wrap">
<span class="unit">文档被下载</span>
<span class="num">+{$docdownedscoresum|default=0}</span>
</div>
</td>
<td>
<div class="wrap">
<span class="unit">系统奖励</span>
<span class="num">+{$systemscoresum|default=0}</span>
</div>
</td>
<td>
<div class="wrap">
<span class="unit">完成悬赏奖励</span>
<span class="num">+{$docxsedscoresum|default=0}</span>
</div>
</td>
<td>
<div class="wrap">
<span class="unit">文库消费</span>
<span class="num">-{$docxstotalscoresum|default=0}</span>
</div>
</td>
<td>

</td>
</tr>
</tbody>
</table>
</div>


<div class="myinfo "  style="border-right: 1px dotted #dbdcde;">
<p class="wealth-number"><a href="{:url('user/docdown')}">{$sumdowncount}</a></p>
<p class="wealth-word">文档被下载(次) </p>
</div>




<div class="myinfo es-mouseover" data-id="xiazaiinfo">
<div >
<p class="wealth-number"><a href="javascript:;">{$userinfo['expoint1']}</a></p>
<p class="wealth-word">{$gpointname} <i class="fa fa-angle-down"></i></p>
</div>
<table class="detail experience" id="xiazaiinfo" >
<tbody><tr>
<td class="first">{$gpointname} 明细</td>
<td style="width: 120px;"><div class="wrap">
<span class="unit">总{$gpointname} </span>
<span class="num">{$userinfo['expoint1']}</span>
</div>
</td>
<td style="width: 120px;">
<div class="wrap">
<span class="unit">上传文档</span>
<span class="num">+{$docuploadexsum|default=0}</span>
</div>
</td>
<td style="width: 130px;">
<div class="wrap">
<span class="unit">文档被下载</span>
<span class="num">+{$docdownexsum|default=0}</span>
</div>
</td>
<td style="width: 130px;">
<div class="wrap">
<span class="unit">日常操作</span>
<span class="num">+{$systemexsum|default=0}</span>
</div>
</td>

</tr>
</tbody></table>
</div>







</div>






</div>
<div class="normal-content">
<div class="headtitle-normal" >
账号设置
</div>
<form class="form-horizontal" id="userinfoform">
  <div class="form-group">
    <label for="usermail" class="col-sm-1 control-label">邮箱</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="usermail" name="usermail" value="{$userinfo['usermail']}" placeholder="请输入邮箱地址">
    </div>
  </div>
  <div class="form-group">
    <label for="nickname" class="col-sm-1 control-label">昵称</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="nickname" name="nickname" value="{$userinfo['nickname']}" placeholder="设置个性昵称">
    </div>
  </div>
  <div class="form-group">
    <label for="userhome" class="col-sm-1 control-label">城市</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" id="userhome" name="userhome"  value="{$userinfo['userhome']}" placeholder="设置您所在的城市">
    </div>
  </div>
    <div class="form-group">
    <label for="description" class="col-sm-1 control-label">签名</label>
    <div class="col-sm-7">
      <textarea rows="3" class="form-control" placeholder="说点什么刷一下存在感"  id="description" name="description" >{$userinfo['description']}</textarea>
    </div>
  </div>
  <div class="form-group">
    <label for="description" class="col-sm-1 control-label">{$pointname}</label>
    <div class="col-sm-7">
      {$userinfo['point']}
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-1 col-sm-5">
      <button type="button" data-name="userinfoform"  data-url="{:url('user/setinfoHandle')}" class="btn btn-success changeinfo"><i class="fa fa-save"></i> 保存</button>
    </div>
  </div>
</form>
</div>


</div>


<div id="myavatar"  class="hide">
<div class="normal-content">
<div class="headtitle-normal" >
头像设置
</div>
   <form class="form-horizontal" id="useravatarform">
<div class="avatar-add">
                <p>建议尺寸168*168，支持jpg、png、gif，最大不能超过30KB</p>
                <div class="upload-img">
                  <div class="layui-box layui-upload-button" style="overflow:hidden;">
             
                 <div class="" style="width:100%;display:block;overflow:hidden">
                  <div class=" " id="flash-upload-wrap" data-url="{:url('File/pictureUpload')}"><i class="iconfont icon-shangchuan2"></i> 上传头像</div>
                  <input type="hidden" class="form-control" id="userhead" name="userhead"  value="{$userinfo.userhead}" >
                  
                  </div>

                  
               
             </div>
                </div>
                <img src="{:getheadurl($userinfo['userhead'])}" id="userheadimg">
                <span class="loading"></span>
              </div>
                    <div class="form-group" style="margin-top:10px;">
    <div class="col-sm-5">
      <button type="button" data-name="useravatarform"  data-url="{:url('user/setavatarHandle')}" class="btn btn-warning changeinfo"><i class="fa fa-save"></i> 修改头像</button>
    </div>
  </div>
     </form>
</div>              
</div>



<div id="mypassword"  class="hide">
<div class="normal-content">
<div class="headtitle-normal" >
密码设置
</div>
<form class="form-horizontal" id="setpasswordform">
  <div class="form-group">
    <label for="old_password" class="col-sm-2 control-label">当前密码</label>
    <div class="col-sm-4">
      <input type="password" class="form-control" id="old_password" name="old_password" placeholder="请输入当前密码">
    </div>
  </div>
  <div class="form-group">
    <label for="password" class="col-sm-2 control-label">新密码</label>
    <div class="col-sm-4">
      <input type="password" class="form-control" id="password" name="password" placeholder="设置新密码">
    </div>
  </div>
  <div class="form-group">
    <label for="confirm_password" class="col-sm-2 control-label">确认密码</label>
    <div class="col-sm-4">
      <input type="password" class="form-control" id="confirm_password" name="confirm_password" placeholder="再次输入新密码">
    </div>
  </div>
    
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-5">
      <button type="button" data-name="setpasswordform"  data-url="{:url('user/setpasswordHandle')}" class="btn btn-success changeinfo"><i class="fa fa-lock"></i>确认修改</button>
    </div>
  </div>
</form>
</div>


</div>

<div id="mybind"  class="hide">
<div class="normal-content">
<div class="headtitle-normal" >
账号绑定
</div>
<ul class="app-bind">
              <li class="fly-msg app-havebind">
                <i class="iconfont icon-QQ"></i>
                <span>已成功绑定，您可以使用QQ帐号直接登录Fly社区，当然，您也可以</span>
                <a href="javascript:;" class="acc-unbind" type="qq_id">解除绑定</a>
                
                <!-- <a href="" onclick="layer.msg('正在绑定微博QQ', {icon:16, shade: 0.1, time:0})" class="acc-bind" type="qq_id">立即绑定</a>
                <span>，即可使用QQ帐号登录Fly社区</span> -->
              </li>
              <li class="fly-msg">
                <i class="iconfont icon-unie61d"></i>
                <!-- <span>已成功绑定，您可以使用微博直接登录Fly社区，当然，您也可以</span>
                <a href="javascript:;" class="acc-unbind" type="weibo_id">解除绑定</a> -->
                
                <a href="" class="acc-weibo" type="weibo_id" onclick="layer.msg('正在绑定微博', {icon:16, shade: 0.1, time:0})">立即绑定</a>
                <span>，即可使用微博帐号登录Fly社区</span>
              </li>
            </ul>
</div>


</div>





</div>

</div>
    {/block}
        {block name="js"}
    <script type="text/javascript" src="__PUBLIC__/js/webuploader/webuploader.js"></script>
    {/block}
    {block name="script"}
    <script>
    
    $(function(){
    	$('.changeinfo').click(function(){
    		var formname=$(this).data('name');
		    $.post($(this).data('url'),$('form#'+formname).serialize(),function(data){
			    
		    	
		    	
		    	
			      if(data.code == 1){
				        
				        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
				          location.reload();
				        });
				      }else{
				        
				        layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
				        
				        
				        
				   }
			
	    	

	    });
	    return false;
    		
    		
    		
    		
    		
    	});
    	
    	
    })
    </script>
    {/block}